@import 'styles/settings';
@import 'styles/typography-extends';

.dropdownContainer {
  padding: 10px;
  background-color: $white;
  border-radius: 2px;
  position: relative;
  &.open {
    background-color: $accent-grey;
  }
  &.fullWidth {
    width: 100%;
  }
}

.toggleContainer {
  display: flex;
  align-items: center;
  cursor: pointer;
  &.fullWidth {
    justify-content: space-between;
  }
}

.selectedOptionLabel {
  @extend %subtitle;
  color: $_temporary-dark-text;
}

.arrowIcon {
  margin-left: 10px;
  transform: rotate(90deg);
  transition: all .1s linear;
  &.dropdownOpen {
    position: relative;
    top: -2px;
    transform: rotate(-90deg);
  }
  path {
    fill: $_temporary-dark-text;
    stroke: $_temporary-dark-text;
  }
}

.group {
  &:not(:last-child) {
    &::after {
      background-color: $accent-grey;
      height: 1px;
      content: "";
      display: block;
      width: 100%;
    }
  }

  .groupList {
    padding: 10px 0;
    list-style: none;
  }

  &:first-child {
    .groupList {
      padding: 0 0 10px;
    }
  }

  &:last-child {
    .groupList {
      padding: 10px 0 0;
    }
  }
}

.optionsList {
  @extend %bodyText;
  color: $_temporary-dark-text;
  position: absolute;
  cursor: pointer;
  background-color: $white;
  list-style: none;
  padding: $sidebar-paddings 0;
  margin: 0;
  margin-top: 14px;
  left: 0;
  z-index: 6;
  border-radius: 2px;
  min-width: 320px;
  width: max-content;

  &.fullWidth {
    width: 100%;
  }

  .option {
    padding: 5px $sidebar-paddings;

    &:hover {
      background-color: $accent-grey;
    }

    &.selectedOption {
      color: rgba($_temporary-dark-text, 0.5);
    }
  }
}